<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue-指令-v-on</title>

    <script src="js/vue.js"></script>

</head>

<body>
    <div id="app">
        <!-- 通过v-on指令绑定单击事件 -->
        <input type="button" value="点我一下" v-on:click="handle()">
        
        <!-- v-on也存在简写方式，即v-on: 可以替换成@ -->
        <input type="button" value="点我一下" @click="handle()">

    </div>
</body>

<script>
    new Vue({
        el: "#app",
        data: {

        },
        methods: {
            handle: function () {
                alert("你点了我一下");
            }
        }

    })


</script>

</html>